<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>账单详情</title>
  <meta name="keywords" content="">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width,minimum-scale=0.5,maximum-scale=1.0,initial-scale=1.0,user-scalable=no"/>
  <link rel="stylesheet" type="text/css" href="/static/css/main.css"/>
  <link rel="stylesheet" href="/static/css/success.css?v=1.01">
  <script src="/static/js/jquery-2.2.3.min.js"></script>
  <script src="/static/js/pxtorem.js"></script>
 	<script src="/static/js/adress.js"></script>
	<script src="https://a.alipayobjects.com/g/h5-lib/alipayjsapi/3.0.6/alipayjsapi.min.js"></script>
  <script type="text/javascript">
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }
		function tranTime(_time) {
			if (_time.length == '14') {
		    _time = _time.substring(0, 4) + "-" + _time.substring(4, 6) + "-" + _time.substring(6, 8) + " " + _time.substring(8, 10) + ":" + _time.substring(10, 12) + ":" + _time.substring(12, 14);
			}
			return _time;
		}
    $(function() {
		var pay_time = $("#pay_time").text()
		$("#pay_time").text(tranTime(pay_time));
		// alert(window.history.length)
//      var order = GetQueryString("order");
		/*
        var o={};
        o["trade_no"]='12345678';
        $.ajax({
          url:SerAddr+"/pay/paysuccess",
          type: 'POST',
          data:o
        })
        .success(function(data){
        	$("#buyer_amount").text("￥"+data.data.buyer_amount/100);
          $("#store_name").text(data.data.store_name);
          $("#table_code").text(data.data.table_code);
          $("#trade_no").text(data.data.trade_no);
          $("#pay_time").text(tranTime(data.data.pay_time));
        })
        .fail(function() {
        	alert("网络异常，查询失败")
        })
        */

    });
    </script>
		
</head>
<body>
	<section class="success">
	<!--
	  <div class="head">
	  	<div class="head-title">
	  		<div class="head-img">
	  			<img src="/static/img/编组.png"/>
	  		</div>
	    	<p>账单详情</p>
	  	</div>
	  </div>
	  -->
	  <div class="content">
	  	<div class="pay_img content_cen">
		  	<img src="/static/img/icon_succeed.png"/>
		  </div>
		  <div class="money content_cen" id="buyer_amount">
		  	¥{{.buyer_amount}}
		  </div>
		  <div class="status content_cen">
		  	支付成功
		  </div>
		  <div class="solid"></div>
	  </div>
	  
	  <div class="orderinfo">
	  	<div class="public storeInfo">
	  		<span class="wth">门店名称</span>
	  		<span id="store_name" class="col">{{.store_name}}</span>
	  	</div>
	  	<div class="public">
	  		<span class="wth">桌号</span><span id="table_code" class="col">{{.table_code}}</span>
	  	</div>
	  </div>
	  <div class="gap"></div>
	  <div class="orderinfo">
	  	<div class="public">
	  		<span class="wth">交易状态</span><span class="col">已支付</span>
	  	</div>
	  	<div class="public">
	  		<span class="wth">支付方式</span><span class="col">支付宝</span>
	  	</div>
	  	<div class="public">
	  		<span class="wth">交易时间</span><span id="pay_time" class="col">{{.pay_time}}</span>
	  	</div>
	  	<div class="public">
	  		<span class="wth">订单号码</span><span id="trade_no" class="col">{{.trade_no}}</span>
	  	</div>
	  </div>
	</section>
	<div class="btn">
  	<button>关闭</button>
  </div>
	<script type="text/javascript">
			function ready(callback) {
				// 如果jsbridge已经注入则直接调用
				if (window.AlipayJSBridge) {
					callback && callback();
				} else {
					// 如果没有注入则监听注入的事件
					document.addEventListener('AlipayJSBridgeReady', callback, false);
				}
			}
			ready(function() {
				document.querySelector('.btn').addEventListener('click', function() {
					AlipayJSBridge.call('exitApp');
				});
			});
		</script>
</body>
</html>